package com.venutech.gongan.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.venutech.gongan.dao.TbOpWorkMapper;
import com.venutech.gongan.entity.TbOpWork;
import com.venutech.gongan.service.ITbOpWorkService;
import com.ruoyi.common.core.text.Convert;

/**
 * 运维Service业务层处理
 * 
 * @author linxb
 * @date 2023-09-19
 */
@Service
public class TbOpWorkServiceImpl implements ITbOpWorkService 
{
    @Autowired
    private TbOpWorkMapper tbOpWorkMapper;

    /**
     * 查询运维
     * 
     * @param opWorkId 运维主键
     * @return 运维
     */
    @Override
    public TbOpWork selectTbOpWorkByOpWorkId(Long opWorkId)
    {
        return tbOpWorkMapper.selectTbOpWorkByOpWorkId(opWorkId);
    }

    /**
     * 查询运维列表
     * 
     * @param tbOpWork 运维
     * @return 运维
     */
    @Override
    public List<TbOpWork> selectTbOpWorkList(TbOpWork tbOpWork)
    {
        return tbOpWorkMapper.selectTbOpWorkList(tbOpWork);
    }

    /**
     * 新增运维
     * 
     * @param tbOpWork 运维
     * @return 结果
     */
    @Override
    public int insertTbOpWork(TbOpWork tbOpWork)
    {
        return tbOpWorkMapper.insertTbOpWork(tbOpWork);
    }

    /**
     * 修改运维
     * 
     * @param tbOpWork 运维
     * @return 结果
     */
    @Override
    public int updateTbOpWork(TbOpWork tbOpWork)
    {
        return tbOpWorkMapper.updateTbOpWork(tbOpWork);
    }

    /**
     * 批量删除运维
     * 
     * @param opWorkIds 需要删除的运维主键
     * @return 结果
     */
    @Override
    public int deleteTbOpWorkByOpWorkIds(String opWorkIds)
    {
        return tbOpWorkMapper.deleteTbOpWorkByOpWorkIds(Convert.toStrArray(opWorkIds));
    }

    /**
     * 删除运维信息
     * 
     * @param opWorkId 运维主键
     * @return 结果
     */
    @Override
    public int deleteTbOpWorkByOpWorkId(Long opWorkId)
    {
        return tbOpWorkMapper.deleteTbOpWorkByOpWorkId(opWorkId);
    }
}
